#!/bin/bash

if [ -x "$EDITOR" ]
    then
        SINPLE_EDITOR=$EDITOR
    elif [ -x "$VISUAL" ]
        then
            SINPLE_EDITOR=$VISUAL
    elif [ -x "/usr/bin/editor" ]
        then
            SINPLE_EDITOR="/usr/bin/editor"
    else
        echo "No editor found!"
        exit 1
fi

umask 3
$SINPLE_EDITOR $*

exit 0

